package com.neu.service;

import com.github.pagehelper.PageHelper;
import com.neu.dao.ShoppingCollectMapper;
import com.neu.domain.ShoppingAddressExample.Criteria;
import com.neu.domain.ShoppingAdExample;
import com.neu.domain.ShoppingCollect;
import com.neu.domain.ShoppingCollectExample;
import com.neu.domain.ShoppingCollectExample.Criterion;
import com.neu.domain.ShoppingSystemExample;

import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

@Service
public class ShoppingCollectService {
@Resource
 private ShoppingCollectMapper shoppingCollectMapper;


//分页
public List<ShoppingCollect> querySelective(Integer page, Integer limit, String sort, String order){
   ShoppingCollectExample example = new ShoppingCollectExample();
   ShoppingCollectExample.Criteria criteria = example.createCriteria();
  
   
  

   if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
       example.setOrderByClause(sort + " " + order);
   }

   PageHelper.startPage(page, limit);
   return shoppingCollectMapper.selectByExample(example);

}

}
